package FIT::Document::Parser::t::Sanitizer;

use utf8;
use FIT::Test 'FIT::Document::Parser::Sanitizer';
use FIT::Util::HTMLBuilder;

sub css: Test(2) {
    io("tmp")->rmtree;
    my $twig = IUT->make_twig( html => HTML('foo'), out_dir => 'tmp' );
    like $twig->sprint, qr/fit\.css/, 'link to css';
    like io('tmp/fit.css')->all, qr/background-color/, 'css file';
    io("tmp")->rmtree;
}

sub fit_text_after_tidy: Test {
    is
        IUT->make_twig(
            out_dir => 'tmp',
            html    => HTML(TABLE TR TD '<p>a<br/><br/></p>b &nbsp;c'),
        )->root->first_table->first_cell->fit_text,
        "a\n\nb  c";
    io("tmp")->rmtree;
}




